<template>
	<view>
		<view class="mask"></view>
		<view>
			<view class="wxbox">
				<view class="tui-flex tui-space-between prop">
					<view class="tui-popup-title">{{title}}</view>
					<view class="close" @click="close()">
						<!-- <icon type="clear" size="24"/> -->
						<uni-icons type="clear" size="48" color="#999"></uni-icons>
					</view>
				</view>
				<view class="prop content">
					<text>{{content}}</text>
				</view>
				<view class="tui-flex tui-space-between btn">
					<view>价格:<text style="color: #FE5B00;font-weight: 600;">￥{{money}}</text></view>
					<view class="tui-detail-btn">
						<button type="primary" shape="circle" size="mini"
							@tap="reserveOny('/pagesA/ticket/components/bookTicket?name=' + title + '&pric=' + money)"
						>预定</button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcons from '../uni-icons/uni-icons.vue'
	
	export default {
		components: {
			uniIcons
		},
		props: {
			type: {
				type: String,
				default:'1'
			},
			title:{
				type:String,
				default:''
			},
			money:{
				type:Number,
				default:1
			},
			content:{
				type:String,
				default:''
			},
			version:{
				type:String,
				default:''
			}
		},
		data() {
			return {};
		},
		methods:{
			close(){
				this.$emit('close');
			},
			reserveOny(url){
				this.$emit('eventClick', url);
			},
		}
	}
</script>

<style lang="scss">
	.mask{
		position: fixed;
		top: 0;
		left:0;
		width: 100%;
		height: 100%;
		z-index:888;
		background-color: rgba(0, 0, 0, 0.6);
	}
	.btn{
		margin-top:30rpx;
		.tui-detail-btn {
			uni-button {
				background-color: #FE5B00;
				font-size: 26rpx;
			}
		}
	}
	//微信弹窗
	.wxbox{
		position: fixed;
		top:45%;
		z-index: 998;
		width:80%;
		left:7%;
		background-color: #fff;
		border-radius:30rpx;
		padding:20rpx;
		.prop {
			padding: 15rpx 0;
			border-bottom: 2rpx solid #eee;
		}
		.content {
			font-size: 26rpx;
			line-height: 1.5;
			height: 220rpx;
			overflow: auto;
		}
		.close{
			position: absolute;
			top:10rpx;
			right:28rpx;
			z-index: 999;
			text-align: center;
		}
		.tui-popup-title {
			font-size: 32rpx;
		}
	}
	
</style>
